aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/routes/status/[id]/+page.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/routes/status/[id]/+page.ts')
-rw-r--r--frontend/src/routes/status/[id]/+page.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/frontend/src/routes/status/[id]/+page.ts b/frontend/src/routes/status/[id]/+page.ts
index 1b91c67..13a72b1 100644
--- a/frontend/src/routes/status/[id]/+page.ts
+++ b/frontend/src/routes/status/[id]/+page.ts
@@ -3,10 +3,11 @@ import type { PageLoad } from './$types';
export const load: PageLoad = async ({ params, fetch }) => {
const id = params.id;
- const [servicesRes, historyRes, statsRes] = await Promise.all([
+ const [servicesRes, historyRes, statsRes, sslRes] = await Promise.all([
fetch(`http://localhost:8080/api/services`).catch(() => null),
fetch(`http://localhost:8080/api/services/${id}/history`).catch(() => null),
- fetch(`http://localhost:8080/api/services/${id}/stats`).catch(() => null)
+ fetch(`http://localhost:8080/api/services/${id}/stats`).catch(() => null),
+ fetch(`http://localhost:8080/api/services/${id}/ssl`).catch(() => null)
]);
const services = servicesRes?.ok ? await servicesRes.json() : [];
@@ -14,10 +15,12 @@ export const load: PageLoad = async ({ params, fetch }) => {
const historyJson = historyRes?.ok ? await historyRes.json() : [];
const history = Array.isArray(historyJson) ? historyJson : (historyJson.data ?? []);
const stats = statsRes?.ok ? await statsRes.json() : null;
+ const sslInfo = sslRes?.ok ? await sslRes.json() : null;
return {
service: svc ?? null,
history,
- stats
+ stats,
+ sslInfo
};
};